package com.example.tys.dex;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class MyReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {

        String a = context.getString(R.string.app_name);
        Log.i("-----", "MyReceiver:" + context.getApplicationContext());
        Log.i("-----", "MyReceiver:" + context.getApplicationInfo());
        Log.i("-----", "MyReceiver:" + context.getApplicationInfo().className + " : " + a +
                " 包名:" + context.getPackageName());
        Toast.makeText(context, context.getPackageName(), Toast.LENGTH_SHORT).show();
    }
}
